package org.jeecg.modules.flowable.listener;

import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.ExecutionListener;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class ConstractEndListener implements ExecutionListener, ApplicationContextAware {
    private static final long serialVersionUID = 1L;
    private static  ApplicationContext applicationContext;
    @Override
    public void notify(DelegateExecution execution) {
        System.out.println("合同评审说明流程结束");
        System.out.println(execution.getVariables());
    }

    @Override
    public void setApplicationContext(ApplicationContext applicationContextNew) throws BeansException {
        applicationContext = applicationContextNew;
    }
}
